var fs = require('fs');
var path = require('path');
var simplifiedChinese = require('./src/resource/simplified-chinese');
var traditionalChinese = require('./src/resource/traditional-chinese');

var json_simplified_traditional = {};
for (var i = 0, len = simplifiedChinese.length; i < len; i++) {
  var sim = simplifiedChinese[i];
  var tra = traditionalChinese[i];
  json_simplified_traditional[sim] = tra;
}

fs.mkdir('dist', function () { });
var json_string = 'module.exports = ' + JSON.stringify(json_simplified_traditional, null, 2);
fs.writeFileSync(path.resolve('./dist/simplified-traditional.js'), json_string, 'utf8');
fs.copyFile('./src/performance/deal-chinese.js', './dist/deal-chinese.js', function () { });